<?php
namespace app\common\controller;

class CrmController extends AdminController
{
    /**
     * 模板布局, false取消
     * @var string|bool
     */
    protected $layout = 'layout/default';


    //当前模型 
    protected $model;
    //当前的验证器类
    protected $validate;

    public function initialize()
    {
        parent::initialize();
        if( $this->validate != null ){
            $this->validate = 'app\\'.$this->request->module().'\\validate\\'.$this->validate;
        }
        if( $this->model != null ){
            $modelClass = '\app\\'.$this->request->module().'\\model\\' . $this->model;
            $this->model = new $modelClass();
        }
        $this->assign(['data'=>[],'currentRow'=>[]]);
    }

 
}
